/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xos_http.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#ifndef __MSG_FAST_FAST_PROC_H__
#define __MSG_FAST_FAST_PROC_H__

namespace xos_http
{

    class fast_proc
    {
    public:
        fast_proc();
        ~fast_proc();

    protected:
        int get_servlet( task * pTask, const std::string & uri );
        int check_file( task * pTask, const std::string & uri );
        int proc_uri( task * pTask, const std::string & uri );
        int servlet_done( xos_box::i_msg *& pMsg );

    protected:
        int i_did_not_get_file_task( task * pTask );
        int i_get_file_task( task * pTask );

    protected:
        int helper_download_file( xos_box::i_msg *& pMsg );
        int helper_before( xos_box::i_msg *& pMsg );
        int helper_after( xos_box::i_msg *& pMsg );
        int helper_proc( xos_box::i_msg *& pMsg );
        int helper_done( xos_box::i_msg *& pMsg );
        int helper_xos( xos_box::i_msg *& pMsg );

    public:
        int proc( xos_box::i_msg *& pMsg );

    };

} // xos_http

#endif // __MSG_FAST_FAST_PROC_H__
